import $http from "../http.js"


//查询所有电站信息
export const getpower = () => {
    return $http("/station/powerplant/api/list_powerplant", {
        method: "get"
    })
}
//查询具体电站信息
export const getOnePower = (markerId) => {
    return $http("/station/powerplant/get_one_powerplant", {
        method: "post",
        data: {
            powerplantId: markerId
        }
    })
}
//根据电站id查询所有该电站电桩信息
export const getByPowerplant = (markerId) => {
    return $http("/station/station/list_station", {
        method: "post",
        data: {
            powerplantId: markerId
        }
    })
}
//根据定位经纬度查询附近门店
export const longitudeAndLatitudeParam = (params) => {
    return $http("/station/powerplant/list_nearby_powerplant", {
        method: "post",
        data: {
            lat: params.lat,
            lng: params.lng
        }
    })
}
//新增电站订单
export const addPowerplantOrderParam = (params) => {
    console.log(params);
    return $http("/order/powerplant_order/insert_powerplant_order", {
        method: "post",
        data: params
    })
}
